<div class="inner-content-root">
  <div class="filter-box">
    <button class="btn" nz-button nzType="primary" (click)="queryData()">刷新</button>
  </div>
  <div class="content">
    <nz-table #basicTable
              nzBordered
              [nzData]="dataList"
              [nzFrontPagination]="false"
              [nzShowPagination]="false"
              [nzLoading]="defaultHttpConfig.showLoading">
      <thead>
      <tr>
        <th nzWidth="100px">产品ID</th>
        <th nzWidth="300px">产品名称</th>
        <th nzWidth="100px">状态</th>
        <th nzWidth="100px">可用库存</th>
        <th nzWidth="100px">占用库存</th>
        <th nzWidth="100px">已售库存</th>
        <th nzWidth="100px">售价</th>
        <th nzWidth="100px">会员价</th>
        <th>描述</th>
        <th nzWidth="400px">操作</th>
      </tr>
      </thead>
      <tbody>
      <tr *ngFor="let data of basicTable.data">
        <td>{{data.productId}}</td>
        <td>{{data.productName}}</td>
        <td>{{data.productStatus == 20 ? '已上线' : '已下线'}}</td>
        <td>{{data.stock}}</td>
        <td>{{data.occupyStock}}</td>
        <td>{{data.soldStock}}</td>
        <td>
          <input type="number" [(ngModel)]="data.unitPriceDisplay" nz-input/>
        </td>
        <td>
          <input type="number" [(ngModel)]="data.memberPriceDisplay" nz-input/>
        </td>
        <td>
          <input [(ngModel)]="data.productDesc" nz-input/>
        </td>
        <td>
          <button nz-button nzType="link" (click)="updateStatus(data)">切换状态</button>
          <nz-divider nzType="vertical"></nz-divider>
          <button nz-button nzType="link" (click)="updateProduct(data)">更新价格/描述</button>
          <nz-divider nzType="vertical"></nz-divider>
          <button nz-button nzType="link" (click)="updateStock(data)">修改库存</button>
        </td>
      </tr>
      </tbody>
    </nz-table>
  </div>
</div>

